const Treechart = require('../core/treeChart');
const fs = require('fs');
const tree = new Treechart();
var dataStr = fs.readFileSync('./data.txt');
var dataOptionsStr = fs.readFileSync('./dataOptions.txt')
var data = JSON.parse(dataStr);
var dataOptions = JSON.parse(dataOptionsStr);
tree.setData(data)
tree.setDataOptions(dataOptions)
tree.draw();
tree.pipePngImage(__dirname + '/image.png');
//fs.writeFileSync('image.txt' , tree.pipeBase64Image());